/**
 * stu_info 房间路由模块
 */
const express = require('express');
const router = express.Router();
const ResultJson = require('../model/ResultJson.js');
const ServiceFactory = require('../factory/ServiceFactory.js');

router.get('/getStuList', async (rep, res) => {
  let results = await ServiceFactory.stuInfoService.getAllList();
  res.json(new ResultJson(true, '数据请求成功', results));
});

router.get('/getStuListByName', async (req, res) => {
  let results = await ServiceFactory.stuInfoService.getStuListByName(req.query);
  res.json(new ResultJson(true, '数据请求成功', results));
});

module.exports = router;
